<template>
    <div class="box">
      <h2>{{isEdit?'添加':'编辑'}}</h2>
     <slot></slot>
      <div>
        <button @click="$emit('handleBook')">{{isEdit?'添加':'修改'}}</button>
        <button @click="$emit('update:showDialog',false)">关闭</button>
      </div>
    </div>
</template>

<script>
export default {
  name: 'Books1ShowDialog',
  props: {
    isEdit: {
      type: Boolean,
      default: true
    },
    showDialog: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {

    }
  },

  mounted () {

  },

  methods: {

  }
}
</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
}
.box {
  width: 400px;
  height: 400px;
  background-color: rgba(22,31,444,0.5);
  position:fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: center;
}
</style>
